<?php get_header(); ?>

<?php
$curauth = (get_query_var('author_name')) ? get_user_by('slug', get_query_var('author_name')) : get_userdata(get_query_var('author'));
?>
 
 <div id="perfil-lateral">
	<?php echo get_avatar( $curauth->ID , 100 ); ?>
	<h1><?php echo $curauth->first_name; ?></h1>
	<p><?php echo $curauth->description; ?></p>
</div>

<div id="perfil-postagens">
	<ul>
	<!-- The Loop -->

		<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
			<li>
				<div id="perfil-data">
					<?php the_time('d.m.Y'); ?>
				</div>
				
				<div id="perfil-titulo">	
					<a href="<?php the_permalink() ?>" rel="bookmark" title="Ler artigo: <?php the_title(); ?>">
					<?php the_title(); ?></a>
				</div>			
			</li>

		<?php endwhile; else: ?>
			<p><?php _e('Esse autor ainda não escreveu nenhum artigo.'); ?></p>

		<?php endif; ?>

	<!-- End Loop -->

		</ul>
 </div>
 <div class="clear"></div>
<?php get_footer(); ?>